#pragma once

/*-----------------------------------------------------------------*\
	
	Renderable is an object for rendering.

\*-----------------------------------------------------------------*/

namespace Graphics
{
	class Renderable
	{
	private:
		static int m_BaseID;
		int m_ObjID;
		bool m_Visible;
		int m_Sequence;

	public:
		Renderable(void);
		virtual ~Renderable(void) = 0 ;
		int GetObjID();

	protected:
		// the implementation of object rendering
		virtual bool RenderImpl(void) = 0;

	public:
		// call this method to render object
		bool Render(void);

		// if GetVisible() return a false value,
		// RenderImpl() will be omitted in Render()
		// default value is true
        inline bool GetVisible(void) const {return m_Visible;}
		virtual void SetVisible(bool visible);

		// return the render sequence of object
		// default value is 0
        inline int GetSequence(void) const {return m_Sequence;}
		virtual void SetSequence(int sequence);
	};
}